<?php
    $sessao = new Zend_Session_Namespace('segmento');
    $db = Zend_Db_Table_Abstract::getDefaultAdapter();
?>
<div class="tp-cnt">
    <div class="st-limite">
        <div class="box-segmento">
            <div class="conheca">CONHE&Ccedil;A TODOS OS NOSSOS PRODUTOS</div>
            <div class="conheca-itens">
                <div class="itens">
                    <?php
                    $class= array( 
                    '1' => 'debranco',
                    '2' => 'escolar',
                    '3' => 'esportiva',
                    '4' => 'profissional');
                    $cont = 0;
                    $query = 'SELECT SQL_CACHE CTS_ID FROM CATSEGMENTO WHERE CTS_STA = 1 ORDER BY CTS_ORD ASC';
                    $result = $db->fetchAll($query);
                    foreach($result as $key => $row) { 
                        
                    if($sessao->CTS_ID != $row['CTS_ID']) { 
                        $style = $cont == 0 ? 'margin-left: -1px':'margin-left: -4px';
                        $cont++;
                    ?>
                        <a href="<?php echo $this->url(array('controller' => 'portal', 'action' => 'escolhe', 'id' => $row['CTS_ID'])); ?>" class="<?php echo $class[$row['CTS_ID']]?>" style="<?php echo $style; ?>"></a>
                    <?php } } ?>
                </div>
            </div>
            <?php /*
            <div class="pesquisa">
                <form action="#">
                    <input type="text" name="pesquisar" placeholder="pesquisar" />
                    <input type="submit" class="submit" value=""/> 
                </form>
            </div>   
            */ ?>
        </div>
        
        <div class="cnt-logo">
            <a href="<?php echo $this->urlbase.'/';?>" title="D&CloseCurlyQuote;Marco Uniformes"><img src="<?php echo $this->urlbase.'/'.$sessao->img_rp;?>" class="logo" /></a>
            <div class="telefone"><span><?php echo $sessao->CTS_TEL;?></span></div>
            <div class="endereco">
                <?php echo $sessao->CTS_END;?>
            </div>
        </div> 
    </div>
</div>
<div class="bt-cnt">
    <div class="st-limite">
        <div class="empresa"><b>2014</b> &copy; D&CloseCurlyQuote;Marco Uniformes TODOS OS DIREITOS RESERVADOS</div>
    
        <div class="menu">
            <a href="<?php echo $this->urlbase;?>/">Produtos</a>
            |
            <a href="<?php echo $this->urlbase;?>/forma">formas pagamento</a>
            |
            <a href="<?php echo $this->urlbase;?>/contato">contato</a>
            <a href="<?php echo $sessao->CTS_FAC;?>" class="facebook<?php echo $sessao->CTS_ID?>" target="_blank"></a>
        </div>    
    </div>
</div>